#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
Created on 2011-04-16

@author: quermit
'''

import sys
import logging


log = logging.getLogger("core")


def configure_logging():
    format = '%(levelname)-8s %(name)-30s %(message)s'
    logging.basicConfig(format=format)
    logging.getLogger("dialogs").setLevel(logging.DEBUG)
    logging.getLogger("core").setLevel(logging.DEBUG)


def main():
    configure_logging()

    log.info("Starting...")

    log.info("Loading Qt Application...")

    from PyQt4 import QtGui
    from dialogs.main import MainDialog
    app = QtGui.QApplication(sys.argv)

    log.info("Creating Window...")

    main_window = MainDialog()
    main_window.resize(800, 600)
    main_window.show()

    log.info("Started.")

    sys.exit(app.exec_())


if __name__ == '__main__':
    main()
